package com.yu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yu.bean.Salary;
import com.yu.dao.SalaryDAO;
import com.yu.service.SalaryService;

@Service
public class SalaryServiceImpl implements SalaryService {

	@Autowired
	private SalaryDAO salaryDAO;
	
	@Override
	public int add(Salary salary) {
		return salaryDAO.add(salary);
	}

	@Override
	public int update(Salary salary) {
		return salaryDAO.update(salary);
	}

	@Override
	public int delete(int id) {
		return salaryDAO.delete(id);
	}

	@Override
	public List<Salary> getAll() {
		return salaryDAO.getAll();
	}

	@Override
	public List<Salary> getAllWithEmployee() {
		return salaryDAO.getAllWithEmployee();
	}

	@Override
	public Salary getById(int id) {
		return salaryDAO.getById(id);
	}

}
